"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
    date(x) {
        var d1 = [
            "星期天",
            "星期一",
            "星期二",
            "星期三",
            "星期四",
            "星期五",
            "星期六",
        ];
        let data = new Date();
        let ye = data.getFullYear();
        let mo = data.getMonth() + 1;
        let da = data.getDate();
        let d = d1[data.getDay()] + " ";
        let h = data.getHours();
        h = h < 10 ? "0" + h : h;
        let m = data.getMinutes();
        m = m < 10 ? "0" + m : m;
        let s = data.getSeconds();
        s = s < 10 ? "0" + s : s;
        if (x === 'all') {
            return ye + "-" + mo + "-" + da + '_' + h + '_' + m + '_' + s;
        }
        if (x === "date") {
            return ye + "-" + mo + "-" + da;
        }
        else if (x === "time") {
            return h + ":" + m + ":" + s;
        }
        else {
            return ye + "年" + mo + "月" + da + "日" + d + h + ":" + m + ":" + s;
        }
    }
};
